package com.redepronik.negosys.invfac.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * The persistent class for the productocaracteristica database table.
 * 
 */
@Entity
@Table(schema = "invfac", name = "productocaracteristica")
@NamedQuery(name = "Productocaracteristica.findAll", query = "SELECT p FROM Productocaracteristica p")
public class Productocaracteristica implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(allocationSize = 1, name = "PRODUCTOCARACTERISTICA_PRODUCTOCARACTERISTICAID_GENERATOR", sequenceName = "INVFAC.PRODUCTOCARACTERISTICA_PRODUCTOCARACTERISTICAID_SEQ")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "PRODUCTOCARACTERISTICA_PRODUCTOCARACTERISTICAID_GENERATOR")
	@Column(unique = true, nullable = false)
	private Integer productocaracteristicaid;

	@Column(nullable = false)
	private Boolean imprimir;

	@Column(nullable = false)
	private Integer orden;

	@Column(length = 200)
	private String valor;

	// bi-directional many-to-one association to Caracteristica
	@ManyToOne
	@JoinColumn(name = "caracteristicaid", nullable = false)
	private Caracteristica caracteristica;

	// bi-directional many-to-one association to Producto
	@ManyToOne
	@JoinColumn(name = "productoid", nullable = false)
	private Producto producto;

	public Productocaracteristica() {
	}

	public Productocaracteristica(Integer productocaracteristicaid,
			Boolean imprimir, Integer orden, String valor,
			Caracteristica caracteristica, Producto producto) {
		this.productocaracteristicaid = productocaracteristicaid;
		this.imprimir = imprimir;
		this.orden = orden;
		this.valor = valor;
		this.caracteristica = caracteristica;
		this.producto = producto;
	}

	public Caracteristica getCaracteristica() {
		return this.caracteristica;
	}

	public Boolean getImprimir() {
		return this.imprimir;
	}

	public Integer getOrden() {
		return this.orden;
	}

	public Producto getProducto() {
		return this.producto;
	}

	public Integer getProductocaracteristicaid() {
		return this.productocaracteristicaid;
	}

	public String getValor() {
		return this.valor;
	}

	public void setCaracteristica(Caracteristica caracteristica) {
		this.caracteristica = caracteristica;
	}

	public void setImprimir(Boolean imprimir) {
		this.imprimir = imprimir;
	}

	public void setOrden(Integer orden) {
		this.orden = orden;
	}

	public void setProducto(Producto producto) {
		this.producto = producto;
	}

	public void setProductocaracteristicaid(Integer productocaracteristicaid) {
		this.productocaracteristicaid = productocaracteristicaid;
	}

	public void setValor(String valor) {
		this.valor = valor;
	}

}